package com.grakol.parallel.samples;

import java.util.List;

/**
 * Defines function interface for asynchronous operations.
 * 
 * @author LK
 *
 * @param <R> - result type.
 */
public interface IFunction<R> {
	/**
	 * Performs function operations.
	 */
	void perform();
	/**
	 * Returns result of the function operations.
	 * 
	 * @return The result of the function operations.
	 */
	R getResult();
	/**
	 * Merges results of several functions in one result.
	 * 
	 * @param results The given results of several functions.
	 * @return The merged result.
	 */
	R mergeResults( List<R> results );
}
